package it11.Capood.DataLogic;

import it11.Capood.GUI.MainActivity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;

public class BootBroadcastReceiver extends BroadcastReceiver {
	
	private SharedPreferences prefs;
	
	@Override
	public void onReceive(Context context, Intent intent) {
		prefs = context.getSharedPreferences(MainActivity.PREF_CAPOOD, Context.MODE_PRIVATE);
		
		if (prefs.getBoolean(ClipListenService.PREF_CLIP_SERVICE, false)){
			context.startService(new Intent(context,ClipListenService.class));
		}
		
		if (prefs.getBoolean(BluetoothService.PREF_BLUETOOTH_SERVICE, false)){
			context.startService(new Intent(context,BluetoothService.class));
		}
	}

}
